import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function addObj(params) {
  return http.request<HttpResult>("post", "/admin/config/form/insert", {
    data: params
  });
}

export function deleteObjs(ids) {
  return http.request<HttpResult>("post", `/admin/config/form/delete/${ids}`);
}

export function updateObj(params) {
  return http.request<HttpResult>("post", "/admin/config/form/update", {
    data: params
  });
}

export function queryTable(params) {
  return http.request<HttpResult>("get", "/admin/config/form/gettable", {
    params: params
  });
}

export function getObj(id) {
  return http.request<HttpResult>("get", `/admin/config/form/get/${id}`);
}
